package com.frank;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @Author: huweifeng
 * @Date: 2022/11/27
 * @Description: BeanPostProcessor接口
 **/
@Component
public class MyBeanPostProcessor implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("MyBeanPostProcessor postProcessBeforeInitialization..." + bean);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
//        System.out.println("MyBeanPostProcessor postProcessAfterInitialization..." + bean);
        return bean;
    }
}
